<?php
$x=10;

$fn1=fn()=>++$x;
$num=$fn1();
echo $num;
echo PHP_EOL;
var_dump($x);